package chapter02;

public class page45 {
    public static void main(String[] args) {

                String copyFromMe = "Copy every letter until you encounter 'u'."; //给定字符串
                StringBuffer copyToMe = new StringBuffer();//创建一个空的串变量
                int i = 0;
                char c = copyFromMe.charAt(i); //该串变量的第一个字符赋给c
                while (c != 'u'){
                    copyToMe.append(c);
                    c = copyFromMe.charAt(++i);
                }
                System.out.println(copyToMe);

    }
}
